<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <!--  Зависимости Bootstrap-->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet"
          integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js"
            integrity="sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3"
            crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js"
            integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V"
            crossorigin="anonymous"></script>

    <title>Создание вакансии</title>
</head>
<body>
<div class="container-fluid p-0">
    <header th:insert="blocks/header :: header"></header>
    <div class="container">
        <form class="mt-3" th:action="@{/vacancies/create}" method="post" enctype="multipart/form-data">
            <div class="mb-3">
                <label for="title" class="form-label"><b>Название</b></label>
                <input type="text" class="form-control" id="title" name="title"
                       placeholder="Предлагая должность, например, Ведущий Java разработчик">
            </div>
            <div class="mb-3">
                <label for="formFile"><b>Фото</b></label>
                <input class="form-control form-control-sm w-100" type="file" id="formFile" name="file" required>
            </div>
            <div class="mb-3">
                <label for="description" class="form-label"><b>Описание</b></label>
                <textarea class="form-control" id="description" name="description" rows="25"
                          placeholder="Опишите требования к кандидату"></textarea>
            </div>
            <div class="form-check mb-3">
                <input type="checkbox" name="visible" class="form-check-input" id="visible">
                <label class="form-check-label" for="visible">Опубликовать</label>
            </div>
            <div class="mb-3">
                <label for="city"><b>Город</b></label>
                <select class="form-control" id="city" name="cityId">
                    <option th:each="city : ${cities}" th:value="${city.id}" th:text="${city.name}"></option>
                </select>
            </div>
            <div class="mb-3 row">
                <div class="col-6"></div>
                <div class="col-6">
                    <div class="row">
                        <div class="col-6"><a class="btn btn-danger w-100" th:href="@{/vacancies}">Отмена</a></div>
                        <div class="col-6">
                            <button class="btn btn-primary w-100" type="submit">Сохранить</button>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <footer th:insert="blocks/footer :: footer"></footer>
</div>
</body>
</html>